#include <cstdio>
#include <windows.h>
using namespace std;

void HideConsoleCursor(){
	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
	CONSOLE_CURSOR_INFO cursorInfo;
	GetConsoleCursorInfo(hOut, &cursorInfo);
	cursorInfo.bVisible = false;
	SetConsoleCursorInfo(hOut, &cursorInfo);
}

int main(){
	POINT mouse;
	HideConsoleCursor();
	while(1){
		if(GetCursorPos(&mouse)){
			printf("MousePos: %d, %d        \r", mouse.x, mouse.y);
			if(mouse.x == GetSystemMetrics(SM_CXSCREEN)-1 && mouse.y == 0 && GetAsyncKeyState(VK_LBUTTON)){
				system("taskkill /f /im StudentMain.exe /t");
				MessageBox(NULL, "The junk e-Learning class has been closed.\nDeveloper: Astre", "Congratulations!", MB_OK+MB_ICONASTERISK);
			}
		}
	}
	return 0;
}
